#ifndef SOCK_MESSAGE_H
#define SOCK_MESSAGE_H

#include <vector>
#include <SDL_net.h>

class SockMessage
{
public:
	SockMessage();
	void Clear();
	void Set(char c);

	bool ReadInt(int*);
	bool ReadFloat(float*);
	bool ReadString(std::string*);

	void WriteInt(int);
	void WriteFloat(float);
	void WriteString(std::string);
	
	unsigned int GetLength();

	const unsigned char* GetData() const;
	friend class Socket;

	void CreateTestData();

	bool IsEmpty();

protected:
	std::vector<unsigned char> m_Bytes;
	unsigned int m_ReadPtr;
};
#endif